package com.itheima.d6_enum;

public enum B {
    X {
        @Override
        public void go() {

        }
    }, Y("张三") {
        @Override
        public void go() {
            System.out.println(getName() + " ");
        }
    };

    B() {
    }

    B(String name) {
        this.name = name;
    }

    private String name;

    // 抽象枚举
    public abstract void go();

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
